home *** CD-ROM | disk | FTP | other *** search
- 9th July 1992
- -----------------------------------------------------------------------------
- Support Group Application Note
- Number: 205
- Issue: 1
- Author: James Bye
- -----------------------------------------------------------------------------
-
- Writing applications for the Acorn A4
-
- -----------------------------------------------------------------------------
- Applicable Hardware: Acorn A4
-
- Related Application Notes:
-
-
- -----------------------------------------------------------------------------
- Copyright (C) Acorn Computers Limited 1992
-
- Every effort has been made to ensure that the information in this leaflet is
- true and correct at the time of printing. However, the products described in
- this leaflet are subject to continuous development and improvements and
- Acorn Computers Limited reserves the right to change its specifications at
- any time. Acorn Computers Limited cannot accept liability for any loss or
- damage arising from the use of any information or particulars in this
- leaflet. ACORN, ECONET and ARCHIMEDES are trademarks of Acorn Computers
- Limited.
- -----------------------------------------------------------------------------
- Support Group
- Acorn Computers Limited
- Acorn House
- Vision Park
- Histon
- Cambridge CB4 4AE
- -----------------------------------------------------------------------------
-
-
- This application note outlines what the application author needs to take
- into account when writing applications for the Acorn A4 computer.
-
-
- 1. Introduction
-
- The Acorn A4 computer is the first RISC OS portable computer to be produced
- by Acorn. It is essentially an A5000 in a smaller portable box. Being a
- portable computer, the Acorn A4 has significant differences in hardware
- compared with other systems that Acorn have produced, with the differences
- being associated with portability.
-
- This document outlines some of the differences and points out certain
- aspects that application authors should consider when developing software
- for use on the hardware platform.
-
-
-
- 2. Machine user interface
-
- The Acorn A4 computer has a different user interface, regarding the screen
- and the keyboard, to other machines that have been produced.
-
- 2.1 Screen Display
-
- The screen display for the Acorn A4 is an edgelit LCD (Liquid Crystal
- Display), 182mm × 137mm viewing area, with a fixed dot pitch of 0.27mm². It
- is a negative display (white dots on a black background), and it provides a
- 15 grey scale palette and a resolution of 640×480 dots at a frame rate of
- approximately 85Hz. The default – and the only intended – mode for the
- display is Mode 27 which is a 16 'colour' VGA mode, although other RISC OS
- display modes are emulated in letter box formats and/or by pixel doubling.
- The screen itself has the same 4:3 aspect ratio as a standard VGA monitor.
- The colour to greyscale translation is based on luminance, in accordance
- with a 4G + 2R + 1B rule. The exact mapping from the derived luminance
- level to the 15 grey scales is still being refined.
-
- Note that LCD displays are relatively 'slow' i.e. they have a considerable
- persistence which causes the display to appear smeared if objects are
- dragged rapidly or animated. This persistence increases at lower
- temperatures.
-
- A 15pin VGA D-type connector is provided for connection to an external
- monitor, although only one of the monitor or the LCD can be active at any
- one time.
-
-
- 2.2 Keyboard
-
- The keyboard in the portable has some differences that the application
- author will need to take into account. The keyboard has [only] 83 keys; a
- numeric keypad is embedded and there are only ten physical function keys.
- The functionality of F11 and F12 and the numeric keypad are accessible via
- an additional special shifting key (FN). The logical layout is exactly as a
- UK PC, i.e. not identical with the Acorn Archimedes [US] layout and the PC
- Emulator, for example, requires a 'KEYB UK' or equivalent command at an
- appropriate point in its start-up.
-
-
- With the implementation of the FN key, the use of keyboard short cuts can
- become more complicated. On a standard RISC OS 3 machine, the following key
- sequence causes the machine to shutdown:-
-
- shutdown = Ctrl + Shift + F12
-
- On the portable, the shutdown sequence needs an extra key as follows:-
-
- shutdown = Ctrl + Shift + FN + F2
-
- The application author needs to check that the keyboard short-cuts
- implemented are not too tortuous for the average user to employ. Special
- attention needs to be made by authors who are aiming their software at the
- special needs market.
-
- Developers should not make use of the 'FN' key for keyboard shortcuts in
- their own software. However, if you are developing portable specific
- software and wish to make use of the 'FN' key then you should contact
- developer support detailing which keyboard combinations you wish to use.
- This will prevent confusion if Acorn wish to assign 'FN' key combinations in
- the future.
-
- A connector is provided for the connection of an external PC/AT keyboard
- with a 6 pin miniDIN connector. External Archimedes keyboards are not
- supported.
-
- 2.3 Mouse
-
- A standard Acorn mouse is supplied with the Acorn A4. The mouse plugs into
- the main unit via a 9 pin miniDIN plug, the same connector as that of an
- Archimedes. However, although unsurpassed as a pointing device, operation
- of the mouse when away from a suitable flat surface may not always be
- convenient. Hence, it is important that applications software has adequate
- keyboard short-cuts to enable the user to drive the majority of common tasks
- from the keyboard. The portable does have the ability to 'emulate' the
- mouse from the keyboard using the FN key and the cursor keys, although this
- does require a little practise and is not a total substitute for a mouse.
- All keyboard short-cuts should follow the rules laid out in the RISC OS
- Style Guide.
-
-
- 2.4 Sound
-
- The Acorn A4 has a very small internal mono speaker. The actual sound
- produced by this speaker is quieter and of subjectively lower quality than
- an Archimedes speaker. A 3.5mm stereo jack socket (32W) allows personal
- headphones or other amplification equipment to be connected directly. The
- sound quality via the jack socket is at least as good as that produced by
- standard Archimedes computers.
-
-
- 3. Programmers interface
-
- The actual programmer's interface has not changed for the portable. RISC OS
- 3 Version 3.10 is provided as the operating system and all interfaces are
- still supported. However, certain rules need to be followed to ensure that
- the software runs as effectively on the Acorn A4 as on any other RISC OS
- platform.
-
- 3.1 Colours
-
- As the Acorn A4 displays 'only' in one mode and in 15 greyscales it is
- important that the application author produces mode independent software.
- The generation of software that relies on running in mode 12 with 16 true
- colours is not likely to be accepted by users and may not run in an
- effective way on the portable machine. The rendering of sprites for filer
- viewers and iconbar sprites will have their colours automatically
- translated by the Window Manager. However, the application author should
- always use ColourTrans when dealing with colours (i.e. when rendering
- sprites in windows the programmer should call ColourTrans_SelectTable for
- mode- independent sprite rendering).
-
- Application developers should always supply a !Sprites22 with their
- application. The high resolution sprites look better in grey-scale.
-
-
- 4. Battery
-
- The Acorn A4 is powered by a Nickel Cadmium Battery that has an average
- useful life of approximately 3 hours from fully charged. The portable is
- supplied with a mains power supply / charger unit that connects via a 9 pin
- D-type connector at the back of the machine. When the portable is connected
- to the PSU during normal operation, the battery is automatically charged
- whether the machine is in use or not.
-
- An interface is provided to the user/programmer by an application called the
- Battery Manager. The Battery Manager will provide constant feedback of
- battery power remaining to the user via an icon. This will be a sliding bar
- whose indicated level will indicate the proportion of nominal full capacity
- that remains in the battery.
-
-
- 4.1 Running out of power sequence: inside the desktop
-
- The application author needs to understand what series of events will occur
- when the battery level has run down to a level that will require a
- re-charge. This series of events consists of three different thresholds
- (T1, T2 and T3) which are as follows :-
-
- At point T1 (as defined above), the Battery Manager will flash the screen
- repeatedly, accompanying each flash with two short beeps to indicate that
- the battery is nearly discharged and the Battery Manager will display an
- error box indicating this. When the user next presses a key, this flashing
- will stop and the machine will return to normal use and the user will have
- to acknowledge the error box. The user will be expected at this stage to
- complete whatever he is doing and shut the machine down.
-
-
-
- At point T2, the Battery Manager will attempt to shut down the machine.
- This will cause each application that is aware of the auto-shutdown
- mechanism to save its data to a safe place (at the moment, the safe place is
- defined as '<Wimp$ScrapDir>.AppName.data').
-
- Applications that are not aware of the auto-shutdown mechanism will still be
- shut down and any unsaved data will be lost. At the end of a T2 forced
- shutdown, a CMOS flag will be set. On the next occasion the Wimp is
- activated, it will detect this flag and issue a warning box "the last
- shutdown was a forced shutdown", and clear the CMOS flag. This will remind
- the user to retrieve data which may have been auto-stored by a knowledgeable
- application in some default or particular place. If the application wishes
- to be 'clever' it may try and re-load any data that was saved due to a low
- power forced shutdown.
-
- When the auto-shutdown has completed, the Battery Manager will tell the BMU
- to switch off the computer, so preventing the user from resuming activity
- when there is insufficient battery charge remaining to support it.
-
- It is intended that point T3 will never be reached as the Battery Manager
- should have commanded the BMU to remove the power before then. It may,
- however, be reached under exceptional circumstances: e.g. machine crash. At
- point T3 the Battery Manager Unit will immediately assert the reset line and
- then remove all power. If the machine does reach this stage there is
- nothing that the application can do.
-
-
- 4.2 Running out of power: outside the desktop
-
- At point T1, the Battery Manager will flash the screen and generate a double
- bleep accompanying each flash (even if the speaker is disabled). The
- flashing will stop once the user presses a key. This action is the same as
- the desktop action, except the user won't be given an error box.
-
- At point T2, the Battery Manager will *ShutDown the machine and command the
- BMU to remove the power.
-
-
- 4.3 Auto-shutdown mechanism
-
- It will be of considerable benefit to the user of the application if it is
- aware of the auto-shutdown mechanism. This enables the application to save
- its data in a safe place if the machine runs out of power unattended, and
- should prevent the user from losing his data.
-
- The auto-shutdown mechanism is a broadcast message that is sent by the task
- manager. The message is as follows:-
-
- Message_Shutdown 14
- Data field: None
-
- This message will enable applications which know about it to perform some
- pre-determined action such as saving any modified data in a known place.
-
-
-
- When this message is broadcast, the Task Manager will claim the UpCall
- 'Media Search' and if any discs need to be changed (i.e. to save data in a
- safe place) an error 'disc not found' will be returned. In this instance,
- the application should not display the error message. The shutdown save
- should be automatic and require no user intervention.
-
-
- 5. Machine expansion
-
- The Acorn A4 has a limited expansion capability. The base model is a single
- floppy disc 2MByte RAM system, up-gradable to 4MByte and an internal hard
- disc. The high-end model has 4MByte RAM and an internal 60 MByte hard disc.
- Econet networking is provided by an optional module that is internally
- fitted. There is no backplane or internal expansion bus available for
- expansion cards.